package com.alibaba.citrus.ots.sales.plan.api.salesplan.audit;

import com.alibaba.citrus.ots.sales.plan.sdo.SalesPlanAuditTaskSDO;
import com.alibaba.lattice2.epoch.sdk.model.Result;
import com.alibaba.lattice2.epoch.meshflow.model.annotation.MeshFlowService;

/**
 * 审核任务写入服务
 * @author:suqing.tjf
 * @date:2021/9/16
 */
@MeshFlowService(apps = {"bc_ots"}, name = "salesPlanAuditTaskWriteService")
public interface SalesPlanAuditTaskWriteService {

    /**
     * 纪元回调
     * 任务创建，同步保存下一个任务节点数据
     * @param salesPlanAuditTaskSDO
     * @return
     */
    Result<String> syncSalesPlanAuditTask(SalesPlanAuditTaskSDO salesPlanAuditTaskSDO);

    /**
     * 纪元回调
     * 任务submit，更新当前审核任务状态
     * @param salesPlanAuditTaskSDO
     * @return
     */
    Result<Boolean> updateSalesPlanAuditTaskStatus(SalesPlanAuditTaskSDO salesPlanAuditTaskSDO);
}
